Skip to content

feat: replace binary test_first_indicator with three-way test classif…#34

Merged
kenjudy merged 1 commit into
mainfrom
25-test-discipline-replace-binary-with-three-way-classification-high-priority
Apr 7, 2026
Merged

feat: replace binary test_first_indicator with three-way test classif…#34
kenjudy merged 1 commit into
mainfrom
25-test-discipline-replace-binary-with-three-way-classification-high-priority

Conversation

@kenjudy

@kenjudy kenjudy commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

…ication

Resolves #25. The binary test_first_indicator collapsed three meaningfully different commit types into one metric, making large prod-only commits (the clearest AI drift signal) indistinguishable from test-only commits (a positive TDD signal).

Replaces test_first_pct with three granular summary fields:

  • test_coverage_rate: commits with test AND prod files / total
  • test_isolation_rate: commits with test-only files / total
  • uncovered_prod_rate: large prod-only commits (no tests) / total

Per-commit fields added: test_only_commit, uncovered_prod_commit. classifyDoraArchetype updated to use uncovered_prod_rate as the foundational-challenges signal. generateInsights emits targeted warnings and positive signals for each rate. Both GitHub Actions workflows mirrored. metrics-specification.md updated throughout.

Also skips pr-metrics.yml job for dependabot[bot] — Dependabot PRs run with a read-only token; the createComment call always fails with 403 and dependency bumps have no analytical value.

133 tests passing, lint clean, typecheck clean.

…ication

Resolves #25. The binary test_first_indicator collapsed three meaningfully
different commit types into one metric, making large prod-only commits
(the clearest AI drift signal) indistinguishable from test-only commits
(a positive TDD signal).

Replaces test_first_pct with three granular summary fields:
- test_coverage_rate: commits with test AND prod files / total
- test_isolation_rate: commits with test-only files / total
- uncovered_prod_rate: large prod-only commits (no tests) / total

Per-commit fields added: test_only_commit, uncovered_prod_commit.
classifyDoraArchetype updated to use uncovered_prod_rate as the
foundational-challenges signal. generateInsights emits targeted
warnings and positive signals for each rate. Both GitHub Actions
workflows mirrored. metrics-specification.md updated throughout.

Also skips pr-metrics.yml job for dependabot[bot] — Dependabot PRs
run with a read-only token; the createComment call always fails with
403 and dependency bumps have no analytical value.

133 tests passing, lint clean, typecheck clean.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Apr 7, 2026

Copy link
Copy Markdown

PR Analysis

Size: medium (based on production code)
Production Code: 135 lines (8 files)
Test Code: 136 lines (4 files)
Total: 271 lines (12 files)
Test-to-Production Ratio: 1.01:1

Concerns

  • 1/1 commits exceed 100 production lines
  • 1/1 commits touch more than 5 files
  • Median net additions ratio 0.62 exceeds 0.50 - possible batch-acceptance pattern

Strengths

  • Strong test-first discipline across commits
  • Message quality 100% meets discipline threshold

Commit Analysis

Total Commits: 1
Average Commit Size: 135 production lines
Average Files per Commit: 12.0

Metric Value
Large commits (>100 prod lines) 1/1 (100%)
Sprawling commits (>5 files) 1/1 (100%)
Test-first discipline 1/1 (100%)
Message quality 1/1 (100%)
Median net additions ratio 0.62
Test-only commits 0
Production-only commits 0

Commit Details

2454a62 Ken Judy (4/7/2026)
feat: replace binary test_first_indicator with three-way test classification
135 prod lines, 12 files [large, sprawling, test+prod]

Test Coverage

Test Adequacy: good

  • Good balance of production and test code

Target ratio: 0.5-2.0 test lines per production line

DORA Capability Assessment

Archetype: legacy-bottleneck
High sprawl combined with large commits. AI may be making cross-cutting changes worse.

Capability Metric Value Target
Small Batches Large commit % 100% <20%
Small Batches Sprawling commit % 100% <10%
Version Control Test-first discipline 100% >50%
Version Control Message quality 100% >60%
AI Risk Signal Net additions ratio (median) 0.62 <0.50
Automated by Code Metrics Workflow

@kenjudy
kenjudy merged commit 757882f into main Apr 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test Discipline: Replace Binary with Three-Way Classification (High Priority)

1 participant